home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / emacs / emacs1857 / bin_d2.zoo / lisp / inc-vers.el < prev    next >
Text File  |  1991-12-02  |  2KB  |  44 lines

  1. ;; Load this file to increment the recorded Emacs version number.
  2. ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
  3.  
  4. ;; This file is part of GNU Emacs.
  5.  
  6. ;; GNU Emacs is free software; you can redistribute it and/or modify
  7. ;; it under the terms of the GNU General Public License as published by
  8. ;; the Free Software Foundation; either version 1, or (at your option)
  9. ;; any later version.
  10.  
  11. ;; GNU Emacs is distributed in the hope that it will be useful,
  12. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ;; GNU General Public License for more details.
  15.  
  16. ;; You should have received a copy of the GNU General Public License
  17. ;; along with GNU Emacs; see the file COPYING.  If not, write to
  18. ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.  
  21. (insert-file-contents "../lisp/version.el")
  22.  
  23. (re-search-forward "emacs-version \"[^\"]*[0-9]+\"")
  24. (forward-char -1)
  25. (save-excursion
  26.   (save-restriction
  27.     (narrow-to-region (point)
  28.               (progn (skip-chars-backward "0-9") (point)))
  29.     (goto-char (point-min))
  30.     (let ((version (read (current-buffer))))
  31.       (delete-region (point-min) (point-max))
  32.       (prin1 (1+ version) (current-buffer)))))
  33. (skip-chars-backward "^\"")
  34. (message "New Emacs version will be %s"
  35.      (buffer-substring (point)
  36.                (progn (skip-chars-forward "^\"") (point))))
  37.  
  38.  
  39. (write-region (point-min) (point-max) "../lisp/version.el" nil 'nomsg)
  40. (erase-buffer)
  41. (set-buffer-modified-p nil)
  42.  
  43. (kill-emacs)
  44.